Computer peripheral devices are connected to a computer via various interfaces. In most cases, computer interfaces provide not only a data path between a computer and peripheral devices, but also power from the computer to the peripheral devices. Therefore, in cases that the computer is powered off, the peripheral devices connected to the computer lose their power supply.
China patent CN101710252B discloses a solution of avoiding data loss in a buffer memory of a storage device in the case of an unexpected power-off. In this solution, a backup power is provided in the storage device. When an unexpected power-off occurs, the backup power provides temporary electricity to forward and store the data in the buffer memory (cache) to a flash memory. US patent U.S. Pat. No. 8,031,551B2 discloses a solution that a capacitor is used as the backup power of the storage device, and the performance of the capacitor is measured during runtime. If the charge quantity of the capacitor is too low, the capacitor is recharged.
China patent CN101483480A discloses that an alarm signal is generated to indicate the power-off when no voltage from a mainboard can be detected. China patent CN101467212A discloses that various working modes can be selected in a storage device according various sources of the power supply. As illustrated in FIG. 1, the storage means 200 includes power interfaces 230, 240, wherein the power interface 230 is connected to a power source 130 such as a battery, and the power interface 240 is connected to a power source 140 such as a computer. When a determining circuit 220 determines that the power is received from power source 230, the determining circuit 220 indicates NAND flash memory 210 works in a low-power mode, for the reason that the power source 130 is easily exhausted.